<taglib name='html' />

<include file="$includeFile.public_header" /><!--或是"__ADMIN__/header"-->



<import type="js" file="Js.kindeditor/kindeditor" />

<import type="js" file="Js.kindeditor.lang.zh_CN" />

<script type="text/javascript">

    initEditor('content','common');

</script>



<!--  右边内容   -->

<div class="list_tit">

    <span class="tit_left">您当前的位置：首页 > 文章管理 > 文章<php>if($_GET['id']){echo '编辑';}else{echo '添加';}</php></span>

    <a href="__URL__/index/mid/{$Think.get.mid}" class="tit_right">+管理文章</a>

</div>

<div class="page_list">

    <table cellpadding="0" cellspacing="0" border="0" width="100%" class="list_table">

        <tr><th align="left" style="text-indent:5px;">文章<present name="$Think.get.id">编辑<else/>添加</present></th></tr>

    </table>

    <form action="__URL__/<php>if($_GET['id']){echo 'update';}else{echo 'insert';}</php>/mid/{$Think.get.mid}/p/{$Think.get.p}" name="art_add" method="post" enctype="multipart/form-data">

        <input type="hidden" name="id" value="{$Think.get.id}" />

        <input type="hidden" name="menu_id" value="<php>if($data['menu_id'])</php>{$data.menu_id}<php>else</php>{$Think.get.mid}" />

        <table cellpadding="0" border="0" width="100%" class="add_table">

            <tr><th width="100">文章标题:</th>

                <td><input type="text" name="title" value="{$data.title}" size="55" maxlength="125" class="page_txt" /></td>

            </tr>

            <tr class="hide"><th width="100">文章标签:</th>

                <td><input type="text" name="tags" size="35" maxlength="30" value="{$data.tags}" class="page_txt" /><label class="lab"></label></td></tr>
            <tr><th width="100">维修价格:</th>

                <td><input type="text" name="price" size="35" maxlength="10" value="{$data.price}" class="page_txt" /><label class="lab">单位（元）人民币</label></td></tr>

            <tr><th>所属栏目:</th><td>

                    <select name="menu_id" class="page_txt" style="width:auto;">

                        {$menus}

                    </select>

                    <a href="__APP__/Admin/Menu/add" class="btn_css fl" style="display:block; margin-left:10px; text-align:center; line-height:22px;">添加栏目</a>

                </td>

            </tr>

            <tr><th width="100">默认首图:</th>

                <td>

                    <input type="file" class="page_txt cursor" name="image" value="{$data.image}" size="26" />

                </td>	

            </tr>

            <php>if($data['image']){</php>

            <tr>

                <th>&nbsp;</th>

                <td>

                    <img src="{$data.image}" height="100" class="fl" />

                </td>

            </tr>

            <php>}</php>

            <tr><th width="100">文章作者:</th>

                <td><input type="text" name="author" size="25" maxlength="30" value="<php>if($data['author']){</php>{$data.author}<php>}else{</php>{$Think.session.AdminInfo.username}<php>}</php>" class="page_txt" /><label class="lab"></label></td></tr>

            <tr><th width="100">文章来源:</th>

                <td><input type="text" name="from" size="25" maxlength="255" value="{$data['from']?$data['from']:C('SITE_TITLE')}" class="page_txt" /></td>	

            </tr>

            <tr><th width="100">点击次数:</th>

                <td><input type="text" name="view_times" size="25" maxlength="10" value="{$data.view_times|default="0"}" class="page_txt" /><label class="lab"></label></td></tr>

            <tr><th>发布时间:</th>

            <php>

                if(!$data['add_time']){

                $data['add_time']=time();

                }

            </php>

            <td style="text-align:left;"><input name="add_time" type="text" id="add_time" class="Wdate page_txt cursor" onClick="WdatePicker({dateFmt:'yyyy-MM-dd H:mm'})" value="{$data.add_time|date="Y-m-d H:i",###}" size="25" readonly="readonly" /></td></tr>

            <tr><th>文章内容:</th>

                <td colspan="4" style="text-align:left; padding-top:8px;"><textarea name="content" id="content" rows="10" cols="80" style="width: 60%">{$data.content}</textarea><label class="lab">请尽量不要超过100个汉字！</label></td></tr>

            <tr height="60">

                <th>&nbsp;</th>

                <td valign="middle"><input type="submit" name="edit_btn" class="btn" value="提 交" /></td>

            </tr>

        </table>

    </form>

    <div class="clr"></div>

</div>



<include file="$includeFile.public_footer" />